"""Given an array of integers, every element appears twice except for one. 
   Find that single one.
   Note:Your algorithm should have a linear runtime complexity. 
   Could you implement it without using extra memory
   """
#! /usr/bin/python
class Solution:
    # @param A, a list of integer
    # @return an integer
    def singleNumber(self, A):
        the_single_Number = 0
        for i in xrange(len(A)):
            the_single_Number ^= A[i]
        return the_single_Number
test = Solution()
A=[1,2,3,4,5,5,4,3,2,1,10]
print test.singleNumber(A);